home *** CD-ROM | disk | FTP | other *** search
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; ;;
- ;; EuLisp Module Copyright (C) University of Bath 1991 ;;
- ;; ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- (defmodule loopsII
-
- (standard0) ()
- ;;( lists list-operators macros0 others)
-
- ()
-
- (defun map-while (ff pf)
- (when (pf) (ff) (map-while ff pf)))
-
- (defmacro while (pred . forms)
- `(let/cc @continue-cont@
- (let/cc @break-cont@
- (map-while (lambda () (progn ,@forms)) (lambda () ,pred)))))
-
- ;; (defmacro for (init test iter . body)
- ;; `(progn
- ;; ,init
- ;; (while ,test
- ;; ,@body
- ;; ,iter)))
-
- (defmacro ++ (var)
- `(setq ,var (+ ,var 1)))
-
- (export map-while while ++)
-
- )
-